<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0090)http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Apache Hadoop 2.7.2 – Hadoop: Setting up a Single Node Cluster.</title>
    <style type="text/css" media="all">
      @import url("./css/maven-base.css");
      @import url("./css/maven-theme.css");
      @import url("./css/site.css");
    </style>
    <link rel="stylesheet" href="./Apache Hadoop 2.7.2 – Hadoop_ Setting up a Single Node Cluster._files/print.css" type="text/css" media="print">
        <meta name="Date-Revision-yyyymmdd" content="20160126">
    
      <link type="text/css" rel="stylesheet" href="chrome-extension://kfgmnlgjmofpiicpgohgfpeabgpmhjdp/style.css"><script type="text/javascript" charset="utf-8" src="chrome-extension://kfgmnlgjmofpiicpgohgfpeabgpmhjdp/page_context.js"></script><style type="text/css">#yddContainer{display:block;font-family:Microsoft YaHei;position:relative;width:100%;height:100%;top:-4px;left:-4px;font-size:12px;border:1px solid}#yddTop{display:block;height:22px}#yddTopBorderlr{display:block;position:static;height:17px;padding:2px 28px;line-height:17px;font-size:12px;color:#5079bb;font-weight:bold;border-style:none solid;border-width:1px}#yddTopBorderlr .ydd-sp{position:absolute;top:2px;height:0;overflow:hidden}.ydd-icon{left:5px;width:17px;padding:0px 0px 0px 0px;padding-top:17px;background-position:-16px -44px}.ydd-close{right:5px;width:16px;padding-top:16px;background-position:left -44px}#yddKeyTitle{float:left;text-decoration:none}#yddMiddle{display:block;margin-bottom:10px}.ydd-tabs{display:block;margin:5px 0;padding:0 5px;height:18px;border-bottom:1px solid}.ydd-tab{display:block;float:left;height:18px;margin:0 5px -1px 0;padding:0 4px;line-height:18px;border:1px solid;border-bottom:none}.ydd-trans-container{display:block;line-height:160%}.ydd-trans-container a{text-decoration:none;}#yddBottom{position:absolute;bottom:0;left:0;width:100%;height:22px;line-height:22px;overflow:hidden;background-position:left -22px}.ydd-padding010{padding:0 10px}#yddWrapper{color:#252525;z-index:10001;background:url(chrome-extension://eopjamdnofihpioajgfdikhhbobonhbb/ab20.png);}#yddContainer{background:#fff;border-color:#4b7598}#yddTopBorderlr{border-color:#f0f8fc}#yddWrapper .ydd-sp{background-image:url(chrome-extension://eopjamdnofihpioajgfdikhhbobonhbb/ydd-sprite.png)}#yddWrapper a,#yddWrapper a:hover,#yddWrapper a:visited{color:#50799b}#yddWrapper .ydd-tabs{color:#959595}.ydd-tabs,.ydd-tab{background:#fff;border-color:#d5e7f3}#yddBottom{color:#363636}#yddWrapper{min-width:250px;max-width:400px;}</style></head>
  <body class="composite" gtools_scp_screen_capture_injected="true" youdao="bind" style="position: static;">
    <div id="banner">
                  <a href="http://hadoop.apache.org/" id="bannerLeft">
                                        <img src="./Apache Hadoop 2.7.2 – Hadoop_ Setting up a Single Node Cluster._files/hadoop-logo.jpg" alt="">
                </a>
                        <a href="http://www.apache.org/" id="bannerRight">
                                        <img src="./Apache Hadoop 2.7.2 – Hadoop_ Setting up a Single Node Cluster._files/asf_logo_wide.png" alt="">
                </a>
            <div class="clear">
        <hr>
      </div>
    </div>
    <div id="breadcrumbs">
            
                                <div class="xleft">
                          <a href="http://www.apache.org/" class="externalLink">Apache</a>
                &gt;
                      <a href="http://hadoop.apache.org/" class="externalLink">Hadoop</a>
                &gt;
                      <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/">Apache Hadoop Project Dist POM</a>
                &gt;
                Apache Hadoop 2.7.2
                </div>
            <div class="xright">            <a href="http://wiki.apache.org/hadoop" class="externalLink">Wiki</a>
            |
                <a href="https://git-wip-us.apache.org/repos/asf/hadoop.git" class="externalLink">git</a>
            |
                <a href="http://hadoop.apache.org/" class="externalLink">Apache Hadoop</a>
              
                                &nbsp;| Last Published: 2016-01-26
              &nbsp;| Version: 2.7.2
            </div>
      <div class="clear">
        <hr>
      </div>
    </div>
    <div id="leftColumn">
      <div id="navcolumn">
             
                                                <h5>General</h5>
                  <ul>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/index.html">Overview</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html">Single Node Setup</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/ClusterSetup.html">Cluster Setup</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/CommandsManual.html">Hadoop Commands Reference</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/FileSystemShell.html">FileSystem Shell</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/Compatibility.html">Hadoop Compatibility</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/InterfaceClassification.html">Interface Classification</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/filesystem/index.html">FileSystem Specification</a>
            </li>
          </ul>
                       <h5>Common</h5>
                  <ul>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/CLIMiniCluster.html">CLI Mini Cluster</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/NativeLibraries.html">Native Libraries</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/Superusers.html">Proxy User</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/RackAwareness.html">Rack Awareness</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SecureMode.html">Secure Mode</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/ServiceLevelAuth.html">Service Level Authorization</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/HttpAuthentication.html">HTTP Authentication</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-kms/index.html">Hadoop KMS</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/Tracing.html">Tracing</a>
            </li>
          </ul>
                       <h5>HDFS</h5>
                  <ul>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html">HDFS User Guide</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html">HDFS Commands Reference</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithQJM.html">High Availability With QJM</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithNFS.html">High Availability With NFS</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/Federation.html">Federation</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/ViewFs.html">ViewFs Guide</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsSnapshots.html">HDFS Snapshots</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html">HDFS Architecture</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsEditsViewer.html">Edits Viewer</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsImageViewer.html">Image Viewer</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html">Permissions and HDFS</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsQuotaAdminGuide.html">Quotas and HDFS</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/Hftp.html">HFTP</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/LibHdfs.html">C API libhdfs</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html">WebHDFS REST API</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-hdfs-httpfs/index.html">HttpFS Gateway</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/ShortCircuitLocalReads.html">Short Circuit Local Reads</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/CentralizedCacheManagement.html">Centralized Cache Management</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsNfsGateway.html">HDFS NFS Gateway</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsRollingUpgrade.html">HDFS Rolling Upgrade</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/ExtendedAttributes.html">Extended Attributes</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/TransparentEncryption.html">Transparent Encryption</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsMultihoming.html">HDFS Support for Multihoming</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/ArchivalStorage.html">Archival Storage, SSD &amp; Memory</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/MemoryStorage.html">Memory Storage Support</a>
            </li>
          </ul>
                       <h5>MapReduce</h5>
                  <ul>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html">MapReduce Tutorial</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapredCommands.html">MapReduce Commands Reference</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduce_Compatibility_Hadoop1_Hadoop2.html">Compatibilty between Hadoop 1.x and Hadoop 2.x</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/EncryptedShuffle.html">Encrypted Shuffle</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/PluggableShuffleAndPluggableSort.html">Pluggable Shuffle/Sort</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/DistributedCacheDeploy.html">Distributed Cache Deploy</a>
            </li>
          </ul>
                       <h5>MapReduce REST APIs</h5>
                  <ul>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapredAppMasterRest.html">MR Application Master</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/HistoryServerRest.html">MR History Server</a>
            </li>
          </ul>
                       <h5>YARN</h5>
                  <ul>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/index.html">Overview</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/YARN.html">YARN Architecture</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/CapacityScheduler.html">Capacity Scheduler</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/FairScheduler.html">Fair Scheduler</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/ResourceManagerRestart.html">ResourceManager Restart</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/ResourceManagerHA.html">ResourceManager HA</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/NodeLabel.html">Node Labels</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/WebApplicationProxy.html">Web Application Proxy</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/TimelineServer.html">YARN Timeline Server</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/WritingYarnApplications.html">Writing YARN Applications</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/YarnCommands.html">YARN Commands</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/NodeManagerRestart.html">NodeManager Restart</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/DockerContainerExecutor.html">DockerContainerExecutor</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/NodeManagerCgroups.html">Using CGroups</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/SecureContainer.html">Secure Containers</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/registry/index.html">Registry</a>
            </li>
          </ul>
                       <h5>YARN REST APIs</h5>
                  <ul>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/WebServicesIntro.html">Introduction</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html">Resource Manager</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/NodeManagerRest.html">Node Manager</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/TimelineServer.html#Timeline_Server_REST_API_v1">Timeline Server</a>
            </li>
          </ul>
                       <h5>Hadoop Compatible File Systems</h5>
                  <ul>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-aws/tools/hadoop-aws/index.html">Amazon S3</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-azure/index.html">Azure Blob Storage</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-openstack/index.html">OpenStack Swift</a>
            </li>
          </ul>
                       <h5>Auth</h5>
                  <ul>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-auth/index.html">Overview</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-auth/Examples.html">Examples</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-auth/Configuration.html">Configuration</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-auth/BuildingIt.html">Building</a>
            </li>
          </ul>
                       <h5>Tools</h5>
                  <ul>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-streaming/HadoopStreaming.html">Hadoop Streaming</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-archives/HadoopArchives.html">Hadoop Archives</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-distcp/DistCp.html">DistCp</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-gridmix/GridMix.html">GridMix</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-rumen/Rumen.html">Rumen</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-sls/SchedulerLoadSimulator.html">Scheduler Load Simulator</a>
            </li>
          </ul>
                       <h5>Reference</h5>
                  <ul>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/releasenotes.html">Release Notes</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/api/index.html">API docs</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/CHANGES.txt">Common CHANGES.txt</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/CHANGES.txt">HDFS CHANGES.txt</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-mapreduce/CHANGES.txt">MapReduce CHANGES.txt</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-yarn/CHANGES.txt">YARN CHANGES.txt</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/Metrics.html">Metrics</a>
            </li>
          </ul>
                       <h5>Configuration</h5>
                  <ul>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/core-default.xml">core-default.xml</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml">hdfs-default.xml</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml">mapred-default.xml</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-common/yarn-default.xml">yarn-default.xml</a>
            </li>
                  <li class="none">
                  <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/DeprecatedProperties.html">Deprecated Properties</a>
            </li>
          </ul>
                                 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
          <img alt="Built by Maven" src="./Apache Hadoop 2.7.2 – Hadoop_ Setting up a Single Node Cluster._files/maven-feather.png">
        </a>
                       
                            </div>
    </div>
    <div id="bodyColumn">
      <div id="contentBox">
        <!-- -
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License. See accompanying LICENSE file. --><h1>Hadoop: Setting up a Single Node Cluster.</h1>

<ul>
  
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Hadoop:_Setting_up_a_Single_Node_Cluster.">Hadoop: Setting up a Single Node Cluster.</a>
  
<ul>
    
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Purpose">Purpose</a></li>
    
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Prerequisites">Prerequisites</a>
    
<ul>
      
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Supported_Platforms">Supported Platforms</a></li>
      
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Required_Software">Required Software</a></li>
      
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Installing_Software">Installing Software</a></li>
    </ul></li>
    
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Download">Download</a></li>
    
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Prepare_to_Start_the_Hadoop_Cluster">Prepare to Start the Hadoop Cluster</a></li>
    
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Standalone_Operation">Standalone Operation</a></li>
    
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Pseudo-Distributed_Operation">Pseudo-Distributed Operation</a>
    
<ul>
      
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Configuration">Configuration</a></li>
      
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Setup_passphraseless_ssh">Setup passphraseless ssh</a></li>
      
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Execution">Execution</a></li>
      
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#YARN_on_a_Single_Node">YARN on a Single Node</a></li>
    </ul></li>
    
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Fully-Distributed_Operation">Fully-Distributed Operation</a></li>
  </ul></li>
</ul>
<div class="section">
<h2><a name="Purpose"></a>Purpose</h2>
<p>This document describes how to set up and configure a single-node Hadoop installation so that you can quickly perform simple operations using Hadoop MapReduce and the Hadoop Distributed File System (HDFS).</p></div>
<div class="section">
<h2><a name="Prerequisites"></a>Prerequisites</h2>
<div class="section">
<h3><a name="Supported_Platforms"></a>Supported Platforms</h3>

<ul>
  
<li>
<p>GNU/Linux is supported as a development and production platform. Hadoop has been demonstrated on GNU/Linux clusters with 2000 nodes.</p></li>
  
<li>
<p>Windows is also a supported platform but the followings steps are for Linux only. To set up Hadoop on Windows, see <a class="externalLink" href="http://wiki.apache.org/hadoop/Hadoop2OnWindows">wiki page</a>.</p></li>
</ul></div>
<div class="section">
<h3><a name="Required_Software"></a>Required Software</h3>
<p>Required software for Linux include:</p>

<ol style="list-style-type: decimal">
  
<li>
<p>Java™ must be installed. Recommended Java versions are described at <a class="externalLink" href="http://wiki.apache.org/hadoop/HadoopJavaVersions">HadoopJavaVersions</a>.</p></li>
  
<li>
<p>ssh must be installed and sshd must be running to use the Hadoop scripts that manage remote Hadoop daemons.</p></li></ol></div>
<div class="section">
<h3><a name="Installing_Software"></a>Installing Software</h3>

<p>If your cluster doesn’t have the requisite software you will need to install it.</p>
<p>For example on Ubuntu Linux:</p>

<div class="source">
<div class="source">
<pre>  $ sudo apt-get install ssh
  $ sudo apt-get install rsync
</pre></div></div></div></div>
<div class="section">
<h2><a name="Download"></a>Download</h2>
<p>To get a Hadoop distribution, download a recent stable release from one of the <a class="externalLink" href="http://www.apache.org/dyn/closer.cgi/hadoop/common/">Apache Download Mirrors</a>.</p></div>
<div class="section">
<h2><a name="Prepare_to_Start_the_Hadoop_Cluster"></a>Prepare to Start the Hadoop Cluster</h2>
<p>Unpack the downloaded Hadoop distribution. In the distribution, edit the file <tt>etc/hadoop/hadoop-env.sh</tt> to define some parameters as follows:</p>

<div class="source">
<div class="source">
<pre>  # set to the root of your Java installation
  export JAVA_HOME=/usr/java/latest
</pre></div></div>
<p>Try the following command:</p>

<div class="source">
<div class="source">
<pre>  $ bin/hadoop
</pre></div></div>
<p>This will display the usage documentation for the hadoop script.</p>
<p>Now you are ready to start your Hadoop cluster in one of the three supported modes:</p>

<ul>
  
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Standalone_Operation">Local (Standalone) Mode</a></li>
  
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Pseudo-Distributed_Operation">Pseudo-Distributed Mode</a></li>
  
<li><a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Fully-Distributed_Operation">Fully-Distributed Mode</a></li>
</ul></div>
<div class="section">
<h2><a name="Standalone_Operation"></a>Standalone Operation</h2>
<p>By default, Hadoop is configured to run in a non-distributed mode, as a single Java process. This is useful for debugging.</p>
<p>The following example copies the unpacked conf directory to use as input and then finds and displays every match of the given regular expression. Output is written to the given output directory.</p>

<div class="source">
<div class="source">
<pre>  $ mkdir input
  $ cp etc/hadoop/*.xml input
  $ bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.2.jar grep input output 'dfs[a-z.]+'
  $ cat output/*
</pre></div></div></div>
<div class="section">
<h2><a name="Pseudo-Distributed_Operation"></a>Pseudo-Distributed Operation</h2>
<p>Hadoop can also be run on a single-node in a pseudo-distributed mode where each Hadoop daemon runs in a separate Java process.</p>
<div class="section">
<h3><a name="Configuration"></a>Configuration</h3>
<p>Use the following:</p>
<p>etc/hadoop/core-site.xml:</p>

<div class="source">
<div class="source">
<pre>&lt;configuration&gt;
    &lt;property&gt;
        &lt;name&gt;fs.defaultFS&lt;/name&gt;
        &lt;value&gt;hdfs://localhost:9000&lt;/value&gt;
    &lt;/property&gt;
&lt;/configuration&gt;
</pre></div></div>
<p>etc/hadoop/hdfs-site.xml:</p>

<div class="source">
<div class="source">
<pre>&lt;configuration&gt;
    &lt;property&gt;
        &lt;name&gt;dfs.replication&lt;/name&gt;
        &lt;value&gt;1&lt;/value&gt;
    &lt;/property&gt;
&lt;/configuration&gt;
</pre></div></div></div>
<div class="section">
<h3><a name="Setup_passphraseless_ssh"></a>Setup passphraseless ssh</h3>
<p>Now check that you can ssh to the localhost without a passphrase:</p>

<div class="source">
<div class="source">
<pre>  $ ssh localhost
</pre></div></div>
<p>If you cannot ssh to localhost without a passphrase, execute the following commands:</p>

<div class="source">
<div class="source">
<pre>  $ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
  $ cat ~/.ssh/id_dsa.pub &gt;&gt; ~/.ssh/authorized_keys
  $ chmod 0600 ~/.ssh/authorized_keys
</pre></div></div></div>
<div class="section">
<h3><a name="Execution"></a>Execution</h3>
<p>The following instructions are to run a MapReduce job locally. If you want to execute a job on YARN, see <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#YARN_on_Single_Node">YARN on Single Node</a>.</p>

<ol style="list-style-type: decimal">
  
<li>
<p>Format the filesystem:</p>
  
<div class="source">
<div class="source">
<pre>  $ bin/hdfs namenode -format
</pre></div></div></li>
  
<li>
<p>Start NameNode daemon and DataNode daemon:</p>
  
<div class="source">
<div class="source">
<pre>  $ sbin/start-dfs.sh
</pre></div></div>
<p>The hadoop daemon log output is written to the <tt>$HADOOP_LOG_DIR</tt> directory (defaults to <tt>$HADOOP_HOME/logs</tt>).</p></li>
  
<li>
<p>Browse the web interface for the NameNode; by default it is available at:</p>
  
<ul>
    
<li>NameNode - <tt>http://localhost:50070/</tt></li>
  </ul></li>
  
<li>
<p>Make the HDFS directories required to execute MapReduce jobs:</p>
  
<div class="source">
<div class="source">
<pre>  $ bin/hdfs dfs -mkdir /user
  $ bin/hdfs dfs -mkdir /user/&lt;username&gt;
</pre></div></div></li>
  
<li>
<p>Copy the input files into the distributed filesystem:</p>
  
<div class="source">
<div class="source">
<pre>  $ bin/hdfs dfs -put etc/hadoop input
</pre></div></div></li>
  
<li>
<p>Run some of the examples provided:</p>
  
<div class="source">
<div class="source">
<pre>  $ bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.2.jar grep input output 'dfs[a-z.]+'
</pre></div></div></li>
  
<li>
<p>Examine the output files: Copy the output files from the distributed filesystem to the local filesystem and examine them:</p>
  
<div class="source">
<div class="source">
<pre>  $ bin/hdfs dfs -get output output
  $ cat output/*
</pre></div></div>
<p>or</p>
<p>View the output files on the distributed filesystem:</p>
  
<div class="source">
<div class="source">
<pre>  $ bin/hdfs dfs -cat output/*
</pre></div></div></li>
  
<li>
<p>When you’re done, stop the daemons with:</p>
  
<div class="source">
<div class="source">
<pre>  $ sbin/stop-dfs.sh
</pre></div></div></li>
</ol></div>
<div class="section">
<h3><a name="YARN_on_a_Single_Node"></a>YARN on a Single Node</h3>
<p>You can run a MapReduce job on YARN in a pseudo-distributed mode by setting a few parameters and running ResourceManager daemon and NodeManager daemon in addition.</p>
<p>The following instructions assume that 1. ~ 4. steps of <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Execution">the above instructions</a> are already executed.</p>

<ol style="list-style-type: decimal">
  
<li>
<p>Configure parameters as follows:<tt>etc/hadoop/mapred-site.xml</tt>:</p>
  
<div class="source">
<div class="source">
<pre>&lt;configuration&gt;
    &lt;property&gt;
        &lt;name&gt;mapreduce.framework.name&lt;/name&gt;
        &lt;value&gt;yarn&lt;/value&gt;
    &lt;/property&gt;
&lt;/configuration&gt;
</pre></div></div>
<p><tt>etc/hadoop/yarn-site.xml</tt>:</p>
  
<div class="source">
<div class="source">
<pre>&lt;configuration&gt;
    &lt;property&gt;
        &lt;name&gt;yarn.nodemanager.aux-services&lt;/name&gt;
        &lt;value&gt;mapreduce_shuffle&lt;/value&gt;
    &lt;/property&gt;
&lt;/configuration&gt;
</pre></div></div></li>
  
<li>
<p>Start ResourceManager daemon and NodeManager daemon:</p>
  
<div class="source">
<div class="source">
<pre>  $ sbin/start-yarn.sh
</pre></div></div></li>
  
<li>
<p>Browse the web interface for the ResourceManager; by default it is available at:</p>
  
<ul>
    
<li>ResourceManager - <tt>http://localhost:8088/</tt></li>
  </ul></li>
  
<li>
<p>Run a MapReduce job.</p></li>
  
<li>
<p>When you’re done, stop the daemons with:</p>
  
<div class="source">
<div class="source">
<pre>  $ sbin/stop-yarn.sh
</pre></div></div></li>
</ol></div></div>
<div class="section">
<h2><a name="Fully-Distributed_Operation"></a>Fully-Distributed Operation</h2>
<p>For information on setting up fully-distributed, non-trivial clusters see <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/ClusterSetup.html">Cluster Setup</a>.</p></div>
      </div>
    </div>
    <div class="clear">
      <hr>
    </div>
    <div id="footer">
      <div class="xright">©            2016
              Apache Software Foundation
            
                       - <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a></div>
      <div class="clear">
        <hr>
      </div>
    </div>
  

</body></html>